lin{1}='-'; lin{2}='--'; lin{3}='-.'; lin{4}='-x'; lin{5}='-o';
yy=2012:2022;
%Data is manually collected from Eikon
%Data 2012-2023, first row ESG, second row all bonds
%US Dollar
usd=[2487000000 3869000000 7805000000 22359009000 40441902000 65429729528 85794651528 146414291528 237624943998 493617887753 639969883986 725689590448;
    15962598250909 17240817840072 18439924685494 19119895933916 20262977716949 23112399785518 22647851299413 24237742710359 26144355893616 27546298574292 26732145040711 26558194279914];
%Euro
eur=[544062915 2415913830 9381860279 21676532910 38150957292 72657116702 110802664591 196110225522 304808803062 541197008756 742975608921 932447873363;
    12282767300042 11148067409206 10931991321659 10711970135401 10581688713768 10188940313395 10367273392529 10746662974839 11175441246018 11423436898668 11523278612132 13243437865792];
%Japanese yen
yen=[0 133950091 357223872 357223872 427012412 1596348967 3887694265 10110455869 20494507416 35317996406 55890800715 81550148719;
    1013153413556 984470540432 968838945066 952113783642 940144501533 931870376533 962682397578 982389699946 1002583810443 1056675719457 1081331767780 1113498619817];

all=100*[eur(1,:)./eur(2,:);yen(1,:)./yen(2,:);usd(1,:)./usd(2,:)];
subplot(2,1,1)
for i=1:3
    plot(yy,all(i,1:end-1),lin{i},'LineWidth',2)
    hold on;
end
hold off
legend('Euro','Japanese Yen','US Dollar','Location','NorthWest')
legend('boxoff')
xlim([2012 2022])
title('Panel A: Corporate bonds, currency')
ylabel('Percent of amount outstanding')
subplot(2,1,2)
and=[0/1 0/1 0/1 0/1 546048248/1306121785 1092096496/1482245190];
mali=[0/1 0/1 0/1 0/1 967683150/2920111982 1663655221/3060857059];
nz=[0/1 0/1 0/1 0/1 0/1 3310906626/124315872024];
dk=[0/1 0/1 0/1 0/1 0/1 2378581053/131609330467];
ger=[0/1 0/1 0/1 18565640459/1778330128876 39315473913/1988595295383 48052245894/2139296136120];
all=[and;mali;nz;dk;ger];
for i=1:5
    plot(2017:2022,100*all(i,:),lin{i},'LineWidth',2)
    hold on;
end
hold off
legend('Andorra','Mali','New Zealand','Denmark','Germany','Location','NorthWest')
legend('boxoff')
xlim([2017 2022])
xticks(2017:2022)
title('Panel B: Government ESG bonds')
ylabel('Percent of amount outstanding')
